<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title> <?php print _('欢迎来到phpBIZ安装程序') ?> </title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <link rel="stylesheet" type="text/css" href="templates/style.css"/>
  </head>

  <body<?php if (isset($translator)
	     && $translator->isRightToLeft()) print ' style="direction:rtl"' ?>>
    <table id="box" cellspacing="0">
      <tr><td id="header" colspan="2"><img src="templates/phplogo.gif" />
      </td>
      </tr>
      <tr><td id="navbar"><div>
	<table cellspacing="0">
	  <tr><td class="heading" colspan="2">
	    <?php print _('安装步骤') ?>
	  </td></tr>
	  <?php for ($i = 0; $i < count($steps); $i++): ?>
	  <tr><td class="navnum">
	    <?php if ($i <= $currentStep->getStepNumber()
		  && ($steps[$i]->isComplete() || $steps[$i]->isOptional())): ?>
	      <span class="success">&radic;</span>
	    <?php elseif ($steps[$i]->isInError()): ?>
	      <span class="error">&#10007;</span>
	    <?php else: ?>
	      <?php print $i ?>
	    <?php endif; ?>
	  </td><td class="navtext">
	    <?php $linkable = ($i == 0 ||
		    ($i <= $currentStep->getStepNumber() + 1 &&
			($steps[$i-1]->isComplete() || $steps[$i-1]->isOptional())));
	    ?>
	    <?php if ($linkable): ?>
	      <a href="<?php printf('%s?step=%s', INDEX_PHP, $i) ?>">
	    <?php endif; ?>
	    <?php print $steps[$i]->stepName(); ?>
	    <?php if ($linkable): ?>
	      </a>
	    <?php endif; ?>
	  </td></tr>
	  <?php endfor; ?>
	  <tr class="help"><td>
	    <span class="helpBox">?</span>
	  </td><td>
	    <a href="../install_guide/install_guide.html" target="_blank"><?php print _('安装帮助'); ?></a>
	  </td></tr>
	  <tr><td>
	    <span class="helpBox">X</span>
	  </td><td>
	    <a href="<?php print INDEX_PHP ?>?startOver=1"><?php print _('重新开始'); ?></a>
	  </td></tr>
	</table>
      </div></td>
      <td id="main">
	<?php if (!empty($templateData['errors'])): ?>
	<h2 class="error">
	  <?php foreach ($templateData['errors'] as $error): ?>
	  <?php print $error ?> <br/>
	  <?php endforeach; ?>
	</h2>
	<?php endif; ?>

	<?php if (!empty($templateData['warnings'])): ?>
	<h2 class="warning">
	  <?php foreach ($templateData['warnings'] as $warning): ?>
	  <?php print $warning ?> <br/>
	  <?php endforeach; ?>
	</h2>
	<?php endif; ?>

	<?php include(dirname(__FILE__) . '/' . $templateData['bodyFile']); ?>

	<?php if ($currentStep->isComplete() && !$currentStep->isLastStep()): ?>
	<div class="go">
	  <?php if ($currentStep->isRedoable()): ?>
	  <span class="goToNextL">
	    <a href="<?php printf('%s?step=%s', INDEX_PHP, $stepNumber) ?>&amp;doOver=1">
	      <?php print _('Redo this step'); ?>
	    </a>
	  </span>
	  <?php endif; ?>

	  <?php $nextStep = $stepNumber + 1 ?>
	  <span class="goToNext">
	    <a href="<?php printf('%s?step=%s', INDEX_PHP, $nextStep) ?>">
	      <?php printf(_('继续进行步骤 %d&raquo;'), $nextStep); ?>
	    </a>
	  </span>
	</div>
	<?php endif; ?>
      </td></tr>
      <tr><td id="bottom" colspan="2">
	<h3><?php print _('安装进度') ?></h3>
	<table id="statusTable" cellspacing="0">
	  <tr>
	    <?php if ($templateData['percentComplete'] != 0): ?>
	    <td class="progressMade"
		style="width:<?php print $templateData['percentComplete'] ?>%"><h3>&nbsp;</h3></td>
	    <?php endif; ?>

	    <?php if ($templateData['percentComplete'] != 100): ?>
	    <td class="progressToGo"
		style="width:<?php print (100 - $templateData['percentComplete']) . '%' .
		  (($templateData['percentComplete'] == 0) ? '' : ';border-left:none')
		?>"><h3>&nbsp;</h3></td>
	    <?php endif; ?>
	  </tr>
	</table>
	<?php printf(_('已完成安装的 %d%% '), $templateData['percentComplete']); ?>
      </td></tr>
    </table>
    <div id="footer">
      <?php print _('phpBIZ: <strong>your buiness</strong>, <strong>our success</strong>') ?>
      &raquo; <a href="http://www.phpbiz.cn">phpbiz.cn
    </a> </div>
  </body>
</html>
